<html>
<head>
<meta http-equiv="Content-Language" content="en" />
<meta name="GENERATOR" content="Zend Studio" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>MODULE IMPORT</title>
</head>
<?
$dirs = array("../../../admin/","../../../resource/classes/","../../../sql");
$error=0;
$errDesc="";
foreach ($dirs as $dir) {
	if (!is_dir($dir)){
		$errDesc .="<b style='color:#ff0000'>Error:</b>Directory $dir does not seem to exist<BR>";
		$error++;
	}elseif (!is_writable($dir)){
		$errDesc .="<b style='color:#ff0000'>Error:</b>Check the directory $dir - It does not seem to be writable<BR>";
		$error++;
	}
}
?>
<body bgcolor="#FFFFFF" text="#000000" link="#FF9966" vlink="#FF9966" alink="#FFCC99">
	<table>
		<tr>
			<td align="center" colspan="3">MODULE IMPORTER</td>
		</tr>
		<tr>
			<td colspan="3">&nbsp;</td>
		</tr>
		<?
		if ($error>0){
		echo "	<tr>
			<td colspan=\"3\">$errDesc</td>
		</tr>
		<tr>
			<td colspan=\"3\">&nbsp;</td>
		</tr>";
		
		}
		?>
		<tr>
			<td colspan="3">Welcome to the module importer. Here you will be able to import the 
			modules you created using admin creator into your system. Just use the file selector
			below to choose the file you downloaded from the framework site.</td>
		</tr>
		<tr>
			<td colspan="3">&nbsp;</td>
		</tr>
		<tr>
			<td colspan="3">CHOOSE THE FILE (PACKAGE.CLASS.framework):</td>
		</tr>
		<tr>
			<td colspan="3">&nbsp;</td>
		</tr>
		<tr>
			<td colspan="3"><form action="import.php" name="poster" method="POST" enctype="multipart/form-data">
				<input type="file" name="module"><input type="submit" value="IMPORT">
			</form>
			</td>
		</tr>
		
	</table>
</body>
</html>